rlpr

Section: UNIX Reference Manual (1)
Updated: 1996/05/13
Index Return to Main Contents
 

NAME

rlpr - remote off line print  

SYNOPSIS

rlpr [-Hprinthost] [-Pprinter] [-Xproxyhost] [-#copies] [-Cclass] [-Jjob] [-Ttitle] [-Uuser] [-i[indent]] [-wwidth] [-1234cdfghlmnopqrstvWV] [file ...]  

DESCRIPTION

rlpr uses tcp/ip to send print jobs to lpd servers anywhere on a network. Unlike lpr, it does not require that the remote printers be explicitly known to the local system (traditionally through /etc/printcap), and thus is considerably more flexible and requires less administration.

rlpr can be used anywhere a traditional lpr might be used, and is backwards compatible with traditional BSD lpr.

rlpr can be installed and used in two different ways:

1. Ideally, if the rlpr client can be installed setuid root, then rlpr can interact directly with other lpd's on the network. See examples below.

2. If rlpr cannot be installed setuid root (in cases where one is not the administrator on the machine one needs to print from) then rlpr can be used in conjunction with an rlprd proxy agent. See the configuring a proxy and examples sections below for details.  

MOTIVATION

Traditional Berkeley lpr has one major drawback: the mortal user cannot lpr to a printer which is not listed explicitly in the /etc/printcap file.

This is especially annoying in scenarios where there is a central UNIX server which many users (using their own desktop computers) connect to in order to do their daily work; If those users wish to print files from the central server to their personal machines (assuming they had a local lpd), they cannot do this without the central server's /etc/printcap being edited to contain the host and printer of each user on the network - this scales horribly.  

OPTIONS

 

Environment/Setup

-Hhost     select the host to print to (used with -P).
-Pprinter  select the printer to print to (used with -H).
-Xproxy    select the proxy host to use.
-V         print version and exit.

note: setting up the environment can be automated with environment variables and/or each user's personal .rlprrc file. See rlprrc(5) for details.  

Behavior

-#copies  print copies copies of each document - use
          sparingly, printers aren't copiers.
-m        send mail upon completion.
-r        remove file after printing.
-s        ignored (provided for compatibility).
-q        quiet mode - don't print to stdout.
-W        "Windows" mode - for printing multiple files to
          a windows-based lpd.
 

Document Content

-1  print data using troff(1) R (times roman) font.
-2  print data using troff(1) I (times italic) font.
-3  print data using troff(1) B (times bold) font.
-4  print data using troff(1) S (special) font.
-c  assume data has been produced by cifplot(1).
-d  assume data has been produced by tex(1).
-f  filter data assuming the start of each line has
    a fortran carriage control character.
-g  assume data has been produced by the BSD standard
    plot library.
-l  treat control characters as regular characters.
-n  assume data has been produced by ditroff.
-o  assume data is postscript.
-p  print data using pr(1).
-t  assume data has been produced by troff(1).
-v  assume the data contains a raster image.
 

Document Format

-i[cols]  indent output by cols columns (8 by default).
-h        do not print burst (banner) page.
-wwidth   use width for page width when using pr(1).
-Cclass   use class for class name on burst page instead of
          the local system name.
-Jjob     use job for jobname on burst page instead of
          the first filename in the job.
-Ttitle   use title for titlename when using pr(1)
          instead of current filename.
-Uuser    use user for username on burst page instead of
          the actual username.

 

CONFIGURING A PROXY

In situations where the rlpr client cannot be installed setuid root, rlpr cannot directly talk to an lpd because lpd requires that print requests come from privileged ports. Unfortunately, rlpr cannot "come from a privileged port" without having superuser status.
The privileged port requirement is part of RFC 1179.

If you or someone you know has root access to a machine on the network, you can use a proxy, known as rlprd to get around this architectural wart.

rlprd works by taking lpd requests on a non-privileged port, mapping them to a privileged port, and sending them out to the real lpd. The proxy and the lpd need not be on the same machine.

In the scenario provided in the motivation, if each user had root access on his own machine, it would be optimal for the user to start rlprd up on his own machine, in which case the proxy and the printhost are the same machine. The user would additionally have to make sure his own machine was listed in his local /etc/hosts.lpd so that his lpd would accept connections from his rlprd.

However, if the machine the user wants to print to is not running unix (but is running an lpd) (i.e. Windows, WinNT, etc) -- Then that user can configure his lpd to accept connections from an rlprd running somewhere on the network, and use that rlprd as a proxy for rlpr.

For more on this mess, see rlprd(8).  

EXAMPLES

WITHOUT A PROXY (rlpr is setuid root)

sun% rlpr -Hfoo.bar.org -Php4l foo.c

prints foo.c to the printer hp4l on the host foo.bar.org (assuming foo.bar.org has been configured to accept print requests from host sun in its /etc/hosts.lpd).

sun% who | rlpr -Hfoo.bar.org -Php4l

prints the output of who(1) to the printer hp4l on the host foo.bar.org.

WITH A PROXY (rlpr is a normal program)

sun% rlpr -Xfoo.bar.org -Hfoo.bar.org -Php4l foo.c

prints foo.c to the printer hp4l on the host foo.bar.org using foo.bar.org as a proxyhost. Under this configuration, foo.bar.org needs to be configured to accept print requests from the proxy (itself) and not from sun. In situations where the proxy and the printhost are not the same machine, this can lead to some security holes due to the original lameness of berkeley lpd's host-based security.

note: if a proxyhost isn't set anywhere it is assumed one is not required in your configuration.  

ENVIRONMENT VARIABLES

The following environment variables are used by rlpr:
RLPR_PRINTHOST
Specifies the default host to print to.
PRINTER or LPDEST
Specifies a default printer (printqueue) to use.
First PRINTER is consulted, then LPDEST.
RLPR_PROXY
Specifies a proxy host to use, if necessary.

 

FILES

$HOME/.rlprrc     Printer/Host database
/tmp/cf*          Temporary control files on local machine
/tmp/df*          Temporary data file for jobs from stdin
/var/spool/*/cf*  Temporary control files on printhost
/var/spool/*/df*  Temporary data files on printhost
/etc/hosts.lpd    Host-based security on printhost
/etc/passwd       Personal identification
 

SEE ALSO

rlprd(8), rlprrc(5), lpr(1)  

AUTHOR

meem <meem@gnu.ai.mit.edu>  

BUGS / LIMITATIONS

Some important security issues have yet to be addressed.
The error messages are cryptic and often indecipherable.
Some evil applications have lpr hardcoded into them.
Many of the more esoteric options only work if the lpd supports them. Check the lpd's documentation for details.


 

Index

NAME
SYNOPSIS
DESCRIPTION
MOTIVATION
OPTIONS
Environment/Setup
Behavior
Document Content
Document Format
CONFIGURING A PROXY
EXAMPLES
ENVIRONMENT VARIABLES
FILES
SEE ALSO
AUTHOR
BUGS / LIMITATIONS

This document was created by man2html, using the manual pages.
Time: 22:21:56 GMT, January 16, 2023